<script>
export default {
  name: "AdminIndexView",
  data() {
    return {
      userArr:[
        {
          "id":12,
          "nickname":"光胜",
          "username":"guangsheng",
          "isAdmin":true,
          "imgUrl":"/imgs/head.jpg",
          "createTime":"2025/08/01 14:43:52"
        },
        {
          "id":13,
          "nickname":"刘得滑",
          "username":"ldh",
          "isAdmin":false,
          "imgUrl":"/imgs/a.jpg",
          "createTime":"2025/08/01 14:43:52"
        },
        {
          "id":17,
          "nickname":"杰瑞",
          "username":"jerry",
          "isAdmin":false,
          "imgUrl":"/imgs/b.jpg",
          "createTime":"2025/08/01 14:43:52"
        }
      ],
    }
  },
}
</script>

<template>
  <el-table :data="userArr">
    <el-table-column label="编号" type="index"></el-table-column>
    <el-table-column label="用户名" prop="username"></el-table-column>
    <el-table-column label="昵称" prop="nickname"></el-table-column>
    <el-table-column label="头像">
      <template slot-scope="scope">
        <el-avatar :src="scope.row.imgUrl"></el-avatar>
      </template>
    </el-table-column>
    <el-table-column label="管理员">
      <template slot-scope="scope">
          <el-switch v-model="scope.row.isAdmin"></el-switch>
      </template>
    </el-table-column>
    <el-table-column label="创建时间" prop="createTime"></el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button type="danger">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<style scoped>

</style>